<template>
<div class="container">
    <div class="left">
        <el-input
            placeholder="用户名"
            v-model="input"
            clearable>
        </el-input>
        <el-button type="primary" @click='searchfun'>筛选</el-button>
    </div>
    <div class="right">
        <el-button type="primary"  class="btn1" @click='deletefun'>批量删除</el-button>
        <el-button type="primary" @click="openDialogfun">添加</el-button>
    </div>
</div>
  
</template>

<script>
import eventbus from '../../../utils/eventbus'
export default {
     data() {
      return {
        input: ''
      }
    },
    mounted () {
        console.log(this.input);
    },
    methods: {
        deletefun(){
            eventbus.$emit('deletehander')
        },
        searchfun(){
            this.$emit('sendsearch',this.input)
        },
        openDialogfun(){
            this.$emit('opendialog')
        }
    }
}
</script>

<style lang="less" scoped>
    .container{
        height: 40px;
        background: #fff;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px;
        .left{
            display: flex;
            align-items: center;
            /deep/.el-input__inner{
                width: 160px;
                margin-right:10px
            }
        }
        .right{
            .btn1{
                background: #A0CFFF;
                border: #A0CFFF;
            }
        }
        
    }
</style>